﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// 计量单位
    /// </summary>
    [Table("T_Unit")]
    public class Unit:BaseEntity
    {
        /// <summary>
        /// 计量单位编码
        /// </summary>
        [MaxLength(50)]
        public string UnitCode { get; set; }
        /// <summary>
        /// 计量单位名称
        /// </summary>
        [MaxLength(50)]
        public string UnitName { get; set; }
        /// <summary>
        /// 所属计量单位组
        /// </summary>
        [MaxLength(50)]
        public string UnitGroupName { get; set; }
        /// <summary>
        /// 是否是所属计量单位组的基本计量单位（0：否/1：是）
        /// </summary>
        public int IsStandard { get; set; }
        /// <summary>
        /// 与所属计量单位组基本计量单位的换算率：计量单位*换算率=基本计量单位，如kg*1000=g
        /// </summary>
        [Column(TypeName = "decimal(18,4)")]
        public decimal Coefficient { get; set; }
    }
}
